//Page Object
Page({
  data: {
    background: [
      'https://img0.baidu.com/it/u=3425868493,3104015061&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1682182800&t=00614eaa41389bb829bc718ad6621412',
      'https://img2.baidu.com/it/u=1577373388,3492284830&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800',
      'https://img1.baidu.com/it/u=1063627317,4109173401&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500',
    ],
    indicatorDots: true,
    vertical: false,
    //自动切换
    autoplay: true,
    //自动切换时间间隔
    interval: 5000,
    // 滑动动画时长
    duration: 500,
    //无缝轮播
    circular: true,
  },
  //options(Object)
  onLoad: function (options) {},
  onReady: function () {},
  onShow: function () {
    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
      this.getTabBar().setData({
        selected: 0,
      })
    }
  },
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  onShareAppMessage: function () {},
  onPageScroll: function () {},
  //item(index,pagePath,text)
  onTabItemTap: function (item) {},
})
